import request from '@/utils/request'
/**
 * @description: 获取角色列表
 * @param {*} params:{page 页码, pagesize 每页的条数}
 * @return {*}
 */
export function fatgetRole(params) {
  return request({
    method: 'get',
    url: '/sys/role',
    params
  })
}
export function fatdelRole(id) {
  return request({
    url: `/sys/role/${id}`,
    method: 'DELETE'
  })
}

export function fataddRole(data) {
  return request({
    url: '/sys/role',
    method: 'POST',
    data
  })
}
// 获取员工详情
export function fateditRole(id) {
  return request({
    url: `/sys/role/${id}`,
    method: 'GET'

  })
}

// 有body参数
export function fatupdataRole(data) {
  return request({
    url: `/sys/role/${data.id}`,
    method: 'PUT',
    data
  })
}
